package com.itheima.qingcheng.pojo;



import java.util.List;
import java.util.Objects;

/**
 * @author ghy
 * @version V1.0
 * @date 2025-01-22 14:39
 */

public class PageBean<T> {

    private Long total;
    private List<T> rows;

    public PageBean() {
    }

    public PageBean(Long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PageBean<?> pageBean = (PageBean<?>) o;
        return Objects.equals(total, pageBean.total) && Objects.equals(rows, pageBean.rows);
    }

    @Override
    public int hashCode() {
        return Objects.hash(total, rows);
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "total=" + total +
                ", rows=" + rows +
                '}';
    }
}
